﻿@model IPagedList<AppError>
<div class="page">
    <div class="pageHeader">
        <form id="pagerForm" onsubmit="return navTabSearch(this);" action="/log/apperrors"
        method="GET">
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label>
                        服务器或IP：</label>
                    <input name="MachineIp" type="text" maxlength="40" value="@ViewBag.MachineIp"/>
                </li>
                <li>
                    <label>
                        应用程序：
                    </label>
                    <input name="Server" type="text" maxlength="40" value="@ViewBag.Server" />
                </li>
                <li>
                    <label>
                        用户名：
                    </label>
                    <input name="UserName" type="text" maxlength="40" value="@ViewBag.UserName" />
                </li>
                <li>
                    <label>
                        客户端IP：
                    </label>
                    <input name="ClientIp" type="text" maxlength="40" value="@ViewBag.ClientIp" />
                </li>
                <li>
                    <label>
                        异常级别：
                    </label>
                    <select name="level">
                        <option value="0" @(ViewBag.Level == 0 ? "selected=selected" : string.Empty)>请选择</option>
                        <option value="1" @(ViewBag.Level == 1 ? "selected=selected" : string.Empty)>低</option>
                        <option value="2" @(ViewBag.Level == 2 ? "selected=selected" : string.Empty)>一般</option>
                        <option value="3" @(ViewBag.Level == 3 ? "selected=selected" : string.Empty)>严重</option>
                    </select>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">
                                    检索</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        </form>
    </div>
    <div class="PageContent">
        <div class="panelBar">
            <ul class="toolBar">
                <li><a class="icon" href="/log/apperror/{param}" target="dialog" title="详细信息" mask="true"
                    width="900" height="500" onclick="javascript:void(0);"><span>详细信息</span></a></li>
                <li><a class="delete" href="/log/cleanapperrors" target="ajaxTodo" title="确定要清除所有日志吗?">
                    <span>清除所有日志</span></a></li>
            </ul>
        </div>
        <table class="table" layouth="138" width="100%">
            <thead>
                <tr>
                    <th width="250">
                        服务器
                    </th>
                    <th width="120">
                        应用程序
                    </th>
                    <th width="250">
                        异常类型
                    </th>
                    <th>
                        异常信息
                    </th>
                    <th width="60">
                        异常级别
                    </th>
                    <th width="150">
                        用户名
                    </th>
                    <th width="80">
                        客户端IP
                    </th>
                    <th width="130">
                        日期时间
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var o in Model)
                {
                    <tr target="param" rel="@o.Id">
                        <td>@(o.Machine)
                            (@(o.ServerIp))
                        </td>
                        <td>@o.Server
                        </td>
                        <td>@o.ExType
                        </td>
                        <td>@o.ExMessage
                        </td>
                        <td>@o.LevelText
                        </td>
                        <td>@o.CreatedBy
                        </td>
                        <td>@o.ClientIp
                        </td>
                        <td>
                            @o.CreatedOn.ToString("yyyy-MM-dd HH:mm:ss")
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>
